<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .grid-container {
      /* 网格布局 */
      display: inline-grid;
      border: 2px solid #000;
      /* 定义行，3行的行高都是100px */
      grid-template-rows: 100px 100px 100px;
      /* 定义列，3列的宽都是100px */
      grid-template-columns: 100px 100px 100px;
      margin: 100px;
    }
  </style>
<body>
    <!-- 
        TIP

        当元素设为网格布局以后，容器子元素（项目）的float、display: inline-block、display: table-cell、vertical-align和column-*等设置都将失效。
        接下来我们来学习 Grid 容器相关的属性，具体如下表格中列出的
    -->

    <div class="grid-container">
        <div class="grid-item">1</div>
        <div class="grid-item">2</div>
        <div class="grid-item">3</div>
        <div class="grid-item">4</div>
        <div class="grid-item">5</div>
        <div class="grid-item">6</div>
        <div class="grid-item">7</div>
        <div class="grid-item">8</div>
        <div class="grid-item">9</div>
    </div>
</body>
</html>